#pragma once
#include <iostream>
#include <fstream>
#include <string>

class Util{
public:
	static bool ReadFileContent(const std::string& filename, std::string* out){
		std::ifstream in(filename);
		if(!in.is_open())
			return false;

		std::string line;
		while(getline(in, line)){
			*out += line;
		}
		in.close();
		return true;
	}

	static bool GetOneLine(std::string& reqstr, std::string& out, const std::string& sep){
		auto pos = reqstr.find(sep);
		if(pos == std::string::npos)
			return false;

		out = reqstr.substr(0, pos);
		reqstr = reqstr.substr(pos + sep.size());
		return true;
	}

private:

};